from module.static_module.parent.view import AdditionWindowView
from core.constant import *
from tools.view import *


class OrderIntegrationView(AdditionWindowView):
    def __init__(self, super_model):
        super().__init__(super_model)

    def create_layout_init(self):
        # 绘制标签、内容组件
        # 配置参数
        order_file_ls = self.super_model.order_file_ls  # 订单文件
        mk_data_file_ls = self.super_model.mk_data_file_ls  # 行情文件

        label_config = [
            [LabelMember.OrderFile, WidgetCategory.Entry, order_file_ls, [0]],
            [LabelMember.MkDataFile, WidgetCategory.Entry, mk_data_file_ls, [0]]
        ]
        button_config = [
            [ButtonMember.Ok, WidgetCategory.Button, None]
        ]
        self.auto_layout = AutoLayout(self.frame, label_config, button_config)
        self.auto_layout.button_command(self)


